home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
parstp25.zip
/
PARSER.DOC
< prev
next >
Wrap
Text File
|
1994-02-14
|
7KB
|
167 lines
╔══════════════════════════════════════════════════════════════════════════╗
║ ║
║ HyperAct, Inc. ║
║ P.O.Box. 5517 ║
║ Coralville IA 52241 U.S.A ║
║ Compuserve - 76350,333 ║
║ Phone/Fax - (319) 351-8413 ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝
*******************************************************************************
* PARSER/TP 2.5 *
* Recursive Decent Expression Parser for Turbo Pascal, Loewy Ron, 1991, 1994. *
* Parser.doc, Last Update : Feb. 14, 1994 *
*******************************************************************************
File List
---------
This package contains the following files :
PARSER .INT - Parser/TP Turbo Pascal Interface Source file.
PARSER .TPU - Parser/TP Turbo Pascal Real Mode Unit.
PARSER .DOC - Parser/TP documentation file.
PARSER .REG - Parser/TP Registration File.
PARSER .DLL - Parser/TP DLL.
PARSLIB .PAS - Parser/TP import unit for DLL.
PROGRAMS.TXT - HyperAct Inc shareware products description.
CALC .PAS - Simple Parser Turbo Pascal test sample.
CALCW .PAS - Simple Parser Turbo Pascal test sample - uses DLL.
PARSEDB .TPU - Parser Symbol Table manager Module.
DBENGBAS.TPU - Parser Symbol Table manager Module.
DBENGMEM.TPU - Parser Symbol Table manager Module.
TBLBASE .TPU - Parser Symbol Table manager Module.
QUICKSRT.TPU - Parser Symbol Table manager Module.
COMBSRT .TPU - Parser Symbol Table manager Module.
MERGSORT.TPU - Parser Symbol Table manager Module.
DATEUNIT.TPU - Parser Symbol Table manager Module.
MEMTBOBJ.TPU - Parser Symbol Table manager Module.
PARSER .TPH - Parser/TP online help file in THELP/IDE format.
PARSER .HLP - Parser/TP online help file in WINHELP format.
PARSER .LIB - Parser/TP Library for use with BC++/4
PARSLIB .H - Header File for C++/DLL
CALCCW.CPP - BC++/4 C++ source to the calc program.
Why Register
------------
Parser/TP is a shareware product, if you find this product valuable,
please register it. This section describes the reasones you should register.
By registering Parser/TP you will receive the complete source code to the
parser and the parser symbol table manager, and will be able to compile parser
for inclusion in your protected mode and windows programs.
Registered Parser/TP users get full no-rotality usage permission.
Whats new
---------
V2.5
- Added support for the RANDOM function.
- Improved Error detection and recovery.
- Fixed a bug in handling "dangling" operators
(2+2+ used to result in 6 instead of error).
- Added a DLL version of Parser/TP that allows users of C/C++ and any other
language that supports DLLs to use the Parser/TP package.
- Added the CALCW demo program, a version of CALC that uses the DLL.
- Added C++ support files to call the DLL, includes an import library,
a header file, and an easyWin demo version of the CALCW program (CALCCW).
V2.0
- Added a symbol table, and variable names can be up to 30 characters.
- Improved error reporting.
- Improved lexer.
- Improved CALC demo program.
- The parser getExpr interface receives the source formula string as a
parameter.
V1.1
- Added better documentation in PARSER.PAS source.
- Added A Simple Sample program - CALC.PAS.
Introduction
------------
Parser/TP is a recursive decent expression parser unit for Turbo-Pascal, this
unit includes the 5 basic math. operators (+ - * / ^), and some basic
mathematical functions (sin, exp, cos, ln, log10, log2, abs, arctan, sqr,
sqrt, tan, cotan, arcsin, arccos) and 2 constants (pi, e). Parser can be
used to receive formula input from the user, and perform the neccessary
calculations during program runtime. Parser/TP supports a dynamic symbol
table, that is created and maintained during the parser's execution. New
variables are created when they are referenced for the first time, and
receive the initial value of 0.0 . Variables values can be set by using the
= operator (e.g. myvar = sin(anotherVar)*35 ), and used in user formulas.
Operation
---------
Simply use parser unit in your program using the USES clause, when ever you
want to parse a string formula do :
myResult := getExpr(formulaString, validity);
if (validity = false) then
tellError { the formula has an error at the errAt byte }
else
tellResult(myResult);
Please notice - the source code for the CALC program is provided, so you will
probably find it easy to understand that example after you will look into the
code.
Warranty
--------
There is no warranty what so ever, The package is supplied as is,
The distributor (HyperAct, Inc.), or the author (Loewy Ron), are not,
and will not be responsible for any damages, lost profits,
or inconveniences caused by the use, or inability to use this package.
The use of the program is at your own risk.
By using (or attempting to use) the package you agree to this.
General
-------
Parser/TP is distributed by HyperAct Inc.,
P.O.Box 5517
Coralville IA
52241, U.S.A.
Parser/TP is a (c) copyright 1991, 1994 of HyperAct Inc.
Parser/TP is a shareware package, please register your copy.
To register your copy of Parser please refer to the supplied
PARSER.REG file.
Other programs distributed by HyperAct, Inc. are described in the supplied
PROGRAMS.TXT file.
Contact
-------
Please contact :
HyperAct, Inc.
P.O.Box 5517
Coralville IA 52241
U.S.A
E-Mail : Compuserve - 76350,333
Phone/Fax : (319) 351-8413
To contact the author directly please write to :
Loewy Ron
E-Mail : Compuserve - 100274,162
Credits
-------
Parser/TP was created by Ron Loewy.
Turbo Pascal is a Trademark/Copyright of Borland International.